<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jstl/core">

<ui:composition>

	<div id="#{id}" title="#{title}">

		<ui:insert>

		</ui:insert>
	</div>

	<script type="text/javascript"
		src="#{facesContext.externalContext.requestContextPath}/resources/componentes/tooltip/js/tooltip.js"></script>


	<script type="text/javascript">

 	var tol = new Tooltip();

	var json = {}


	var content ="#{content}";

	if(content != ""){
		json = $.extend(json, {"content":content});
	}
	
  //-------------EFEITO QUE MOSTRA O TOOLTIP------------------------------------//
 
  var effectHide ="#{effectHide}";  
  var durationHide = "#{durationHide}";
  var jsonAuxEfeitos ={};


	if(effectHide != ""){
		
	  
	  if(effectHide == "explode"){
			//effectHideAux = effectHide ="explode";
			jsonAuxEfeitos = $.extend(jsonAuxEfeitos, {"effectHide":"explode"});
	  }		
	
	  if(effectHide == "swing"){
			//effectHideAux = effectHide ="swing";
			jsonAuxEfeitos = $.extend(jsonAuxEfeitos, {"effectHide":"swing"});
	  }
	
	 if(effectHide== "elastic"){
			//effectHideAux = effectHide ="easeInOutElastic";
			jsonAuxEfeitos = $.extend(jsonAuxEfeitos, {"effectHide":"easeInOutElastic"});
	}
   }
	
	if(durationHide){

		//durationShowAux = durationShow; 
		jsonAuxEfeitos = $.extend(jsonAuxEfeitos, {"durationHide": durationHide});
	}


		
	//-------------EFEITO QUE FECHA O TOOLTIP------------------------------------//
  var effectShow ="#{effectShow}";  
  var durationShow = "#{durationShow}";


  if(effectShow != ""){	 	  		

		  if(effectShow == "explode"){
		 // effectShowAux = effectHide ="explode";
		  	jsonAuxEfeitos = $.extend(jsonAuxEfeitos, {"effectShow":"explode"});
		}		
	
		if(effectShow == "swing"){
			//effectShowAux = effectHide ="swing";
			jsonAuxEfeitos = $.extend(jsonAuxEfeitos, {"effectShow":"swing"});
		}
	
		if(effectShow == "elastic"){
			//effectShowAux = effectHide ="easeInOutElastic";
			jsonAuxEfeitos = $.extend(jsonAuxEfeitos, {"effectShow":"easeInOutElastic"});
		}

  }
	
	if(durationShow){

		//durationShowAux = durationShow; 
		jsonAuxEfeitos = $.extend(jsonAuxEfeitos, {"durationShow": durationShow});
	}
  
  
	json = $.extend(json, {position: { my: "right bottom+30",at:"right-500 left-120"}});

	var using = tol.usingFunction("##{id}");

	json = $.extend(json, using);
	
	tol.criandoTooltip("#" + "#{seletor}" + "\\:" + "#{id}", json);
	
	
	
</script>

</ui:composition>

</html>